package mediator;

import java.util.Set;

public class MessageFilter {
    private final Set<String> bannedWords = Set.of("不雅字符", "广告", "垃圾信息");

    public String filterText(String content) {
        String filtered = content;
        for (String word : bannedWords) {
            filtered = filtered.replace(word, "***");
        }
        return filtered;
    }

    public boolean validateImageSize(String imageData) {
        return imageData.length() <= 1024;  // 简单的大小检查
    }


}
